#!/bin/bash
cd ../../cmake-build-debug/
rm -rf callgrind.out.*
valgrind --tool=callgrind ./$1
python gprof2dot.py -f callgrind -n$2 -e2 -s callgrind.out.* > valgrind.dot
dot -Tsvg valgrind.dot -o performance.svg
mv performance.svg ../Test/PerformanceTest/
rm -rf valgrind.dot performance.svg callgrind.out.* gmon.out